#include "ship.h"



void InitEnterprise(struct ship *enterprise,int x, int y)
{
	
	memcpy( ENTERPRISE_ADDRESS , &enterprisedata, sizeof(enterprisedata) );
	sprites[0].attribute[0] = COLOR_256 | SQUARE | (shipPositionX/100);
	sprites[0].attribute[1] = SIZE_32;
	sprites[0].attribute[2] = 512;
}

void MoveEnterprise(struct ship *ship, int x, int y)
{
	ship->sprite->attribute[1] = sprite->attribute[1] & 0xFE00;
	ship->sprite->attribute[1] = sprite->attribute[1] | (x/100);

	ship->sprite->attribute[0] = sprite->attribute[0] & 0xFF00;
	ship->sprite->attribute[0] = sprite->attribute[0] | (y/100);
}


void PositionCalculate( void )
{
	dv=(A-shipThrustY);
	shipVy+=dv;
	shipPositionY+=shipVy;


	dv=(shipThrustX);
	shipVx+=dv;
	shipPositionX+=shipVx;
}


